let TalentManagement = {
    path: 'TalentManagement',
    name: 'TalentManagement',
    component: () =>
        import ('../../../views/Company/TalentManagement/Talentmanger1.vue'),
    children: [{
            path: '',
            name: 'Talentmanger2',
            component: () =>
                import ('../../../views/Company/TalentManagement/Talentmanger2.vue'),
            //展示页
            beforeEnter: (to, from, next) => {
                console.log(from.name)
                if (from.name == 'CompanyHome') {
                    next();
                } else if (from.name == 'AppManger2') {
                    next();
                } else if (from.name == 'Details1') {
                    next();
                } else if (from.name == 'Registration') {
                    next();
                } else if (from.name == 'Details2') {
                    next();
                } else if (from.name == 'MigrationOut') {
                    next();
                } else if (from.name == 'Details3') {
                    next();
                } else if (from.name == 'MigrationIn') {
                    next();
                } else if (from.name == 'Details4') {
                    next();
                } else if (from.name == 'TalentmangerOut') {
                    next();
                } else if (from.name == 'ReportForm') {
                    next();
                } else if (from.name == 'Through') {
                    next();
                } else if (from.name == 'SystemManagement') {
                    next();
                } else if (from.name == 'Rolemanagement') {
                    next();
                } else if (from.name == 'CheckProcess') {
                    next();
                } else if (from.name == 'Registerdetails') {
                    next();
                } else if (from.name == 'Outdetails') {
                    next();
                } else if (from.name == 'SeeChangeRecord') {
                    next();
                } else if (sessionStorage.getItem('fName') && sessionStorage.getItem('fName') == 'Talentmanger2') {
                    next();
                }
            },
        },
        {
            path: '/TalentManagement/TalentmangerOut',
            name: 'TalentmangerOut',
            component: () =>
                import ('../../../views/Company/TalentManagement/TalentmangerOut.vue'),
            //迁出页
            beforeEnter: (to, from, next) => {
                console.log(from.name)
                if (from.name == 'CompanyHome') {
                    next();
                } else if (from.name == 'AppManger2') {
                    next();
                } else if (from.name == 'Details1') {
                    next();
                } else if (from.name == 'Registration') {
                    next();
                } else if (from.name == 'Details2') {
                    next();
                } else if (from.name == 'MigrationOut') {
                    next();
                } else if (from.name == 'Details3') {
                    next();
                } else if (from.name == 'MigrationIn') {
                    next();
                } else if (from.name == 'Details4') {
                    next();
                } else if (from.name == 'Talentmanger2') {
                    next();
                } else if (from.name == 'ReportForm') {
                    next();
                } else if (from.name == 'Through') {
                    next();
                } else if (from.name == 'SystemManagement') {
                    next();
                } else if (from.name == 'Rolemanagement') {
                    next();
                } else if (from.name == 'CheckProcess') {
                    next();
                } else if (from.name == 'Registerdetails') {
                    next();
                } else if (from.name == 'Outdetails') {
                    next();
                } else if (from.name == 'SeeChangeRecord') {
                    next();
                } else if (sessionStorage.getItem('fName') && sessionStorage.getItem('fName') == 'TalentmangerOut') {
                    next();
                }
            },
        }
    ]
}
export default TalentManagement